import request from '@/utils/request'


export default {
  //列表
  getPageList(page,limit,searchObj){
    return request({
      url: '/admin/system/teacher'+"/"+page+"/"+limit,
      method: 'get',
      params: searchObj
    })
  },

  //删除
  removeById(id){
    return request({
      url: '/admin/system/teacher/remove/'+id,
      method: 'delete',
    })
  },

  //添加
  saveTeacher(teacher){
    return request({
      //接口路径
      url:'/admin/system/teacher/save/',
      method: 'post',
      //传递json格式数据
      data: teacher
    })
  },

  //根据id查询
  getTeacherById(id){
    return request({
      url: '/admin/system/teacher/findTeacherById/'+id,
      method: 'get',
    })
  },
  //修改的方法
  update(teacher){
    return request({
      url: '/admin/system/teacher/update',
      method: 'post',
      data: teacher
    })
  },
  //批量删除
  batchRemoveById(idList){
    return request({
      url: '/admin/system/teacher/batchRemove/',
      method: 'delete',
      data: idList
    })
  },
}
